package com.thinkwide.data.ormapping.search;

import com.thinkwide.data.ormapping.search.enums.MFOrderedType;

import java.util.ArrayList;

/**
 * 排序条件
 *
 * @author andyzhang
 * @since 2022/01/05
 */
public class MFSortConditions extends ArrayList<MFSortConditionItem> {

    public MFSortConditionItem add(boolean condition, String column, MFOrderedType orderedType) {
        if (condition) {
            return add(column, orderedType);
        }
        return null;
    }

    public MFSortConditionItem add(String column, MFOrderedType orderedType) {
        MFSortConditionItem item = new MFSortConditionItem(column, orderedType);
        return item;
    }
}
